﻿package commands 
{
	import flash.utils.ByteArray;
	import commands.classesinfo.*;
	
	/**
	 * ...
	 * @author wwx
	 * 10000011 全下
	 */
	public class SoHandleCmdReq extends abCommand 
	{
		
		public function SoHandleCmdReq() //: abCommand(CommandType.CMD_TYPE_SOHANDLE_REQ) 
		{
			super(CommandType(CommandType.CMD_TYPE_SOHANDLE_REQ));
			msgSeq = 10000011;
		}
		
		private var msgSeq:int;//消息号
		public var reserve:int;//保留字段
		
		public var chip:int;//带入筹码
		
		public function convertToBytes(bytes:ByteArray, offset:int):int
		{
			BytesValueConverter.writeIntToBytes(bytes, offset, msgSeq);
			offset += 4;
			BytesValueConverter.writeIntToBytes(bytes, offset, reserve);
			offset += 4;

			BytesValueConverter.writeIntToBytes(bytes, offset, chip);
			offset += 4;
			
			bytes.position = offset;
			bytes.length = offset;
			
			return offset;
		}		
		
	}
	
}